<div class="form">
<?php echo $this->Form->create('Absensi'); ?>
   <fieldset>
      <legend>Pembuatan Jadwal Kerja</legend>
      <?php echo $this->Form->input('JadwalKerja.name',array('label' => 'Nama jadwal')); ?>
      <?php echo $this->Form->input('JadwalKerja.perputaran',array('options' => $cycles, 'default' => 8, 'label' => 'Perputaran Hari [Cycle]')); ?>
      <?php echo $this->Form->input('JadwalKerja.tanggal_mulai',array('type' => 'text', 'class' => 'date_text')); ?>
      <?php echo $this->Form->input('JadwalKerja.tanggal_berakhir',array('type' => 'text', 'class' => 'date_text')); ?>
            
      <fieldset id="fieldset_worktime">
         <legend class="sub-legend">Work Time List</legend>

         <div id="worktime_list">
            <div class="worktime-item-even worktime-item">
               <?php 
               echo $this->Form->input('JadwalKerja.jam_kerja',
                              array('options' => $jam_kerja_list, 
                                    'empty' => '-- pilih jam kerja --', 
                                    'label' => false,'escape' => false
                               )
                     ); 
               ?>
               
               <?php 
               echo $this->Form->input('JadwalKerja.hari',array(
                               'type' => 'select',
                               'multiple' => 'checkbox',
                               'options' => $defaultDays,
                               'label' => false,
                               'div' => 'inputs_wrap',
                               'after' => '<div class="clr" style="margin:0;padding:0;"></div>'
                              )
                        );
               ?>
            </div>
            
            <div class="submit" style="margin-left:35px;margin-top:10px;">
            <input type="button" value="Tambahkan" id="worktime_add" />
            </div>

         </div>

         <div id="added_work_time">
            <table class="index"  width="100%" cellspacing="0" cellpadding="0">
               <tr>
                  <th>Hari</th>
                  <th>Jam Kerja</th>
               </tr>
               
               <tbody id="jadwal_item">
                  
               </tbody>
               
            </table>
         </div>
      </fieldset>

   </fieldset>
   
   <?php echo $this->Form->end(__('Simpan Jadwal', true));?>
</div>

<?php echo $javascript->link('/js/absensi/jadwal_kerja_pembuatan_page'); ?>